package geometria;

public class Punto2D {
    private int x, y;
    public Punto2D() {
        super();
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getX() {
        return x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getY() {
        return y;
    }
       
    public void moveY(int y) {
        this.y = this.y - y;
    }

    public void moveX(int x) {
        this.x = this.x - x;
    }

    public double getDistancia(Punto2D o){
        return Math.sqrt( (this.getX()-o.getX()) * (this.getX()-o.getX())  -  (this.getY()-o.getY()) * (this.getY()-o.getY()) );
    }
}
